// 引入默认首页
import AddressIndex from '@/components/address/index.vue'
import AddressAdd from '@/components/address/add.vue'
import AddressEdit from '@/components/address/edit.vue'

// 子路由列表
const children = [//子路由
    {
        name: 'AddressIndex',
        path: 'index',
        component:AddressIndex,
        meta:{auth:true}
    },
    {
        name: 'AddressAdd',
        path: 'add',
        component:AddressAdd,
        meta:{auth:true}
    },
    {
        name: 'AddressEdit',
        path: 'edit',
        component:AddressEdit,
        meta:{auth:true}
    }
]

// 1级路由的组件
const layout = {
    template: `<router-view></router-view>`
}

// 创建路由对象
export default {
    name: 'address',
    path: '/address', //一级路由
    component: layout, //组件
    children: children
}